<script setup>
import {ref,onMounted} from "vue";
const count  = ref(0);
const add = () => {
  count.value++;
}
// 声明钩子函数
onMounted(() => {
  console.log('mounted');
})
</script>

<template>
  <button @click="add">
    count is: {{ count }}
  </button>
</template>

<style scoped>

</style>